package observer;

/**
 * @Author: Doream
 * @Date: 2022/1/30 11:51
 */
public class Client {
    public static void main(String[] args) {
        SubjectImpl subject = new SubjectImpl();
        ObserverImpl observer1 = new ObserverImpl("1号");
        ObserverImpl observer2 = new ObserverImpl("2号");
        ObserverImpl observer3 = new ObserverImpl("3号");
        ObserverImpl observer4 = new ObserverImpl("4号");
        subject.attach(observer1);
        subject.attach(observer2);
        subject.attach(observer3);
        subject.attach(observer4);

        subject.notify("今天放假");
    }
}
